# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json
imports:
  commons: ./commons.yml
  pagination: ./utils/pagination.yml
service:
  auth: true
  base-path: /api/public
  endpoints:
    get:
      docs: Get a prompt
      method: GET
      path: /prompts
      request:
        name: GetParameterRequest
        query-parameters:
          name: string
          version: optional<integer>
      response: Prompt
    create:
      docs: Create a prompt
      method: POST
      path: /prompts
      request: CreatePromptRequest
      response: Prompt

types:
  CreatePromptRequest:
    properties:
      name: string
      isActive:
        docs: Should the prompt be promoted to production immediately?
        type: boolean
      prompt: string
      config: optional<unknown>

  Prompt:
    properties:
      name: string
      version: integer
      prompt: string
      config: unknown
